﻿<phone:PhoneApplicationPage x:Class="OdcDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:model="clr-namespace:OdcDemo" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        xmlns:odc="clr-namespace:Odyssey.Controls;assembly=Odyssey"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Portrait" Orientation="Portrait"
        mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480" shell:SystemTray.IsVisible="False"
        odc:TiltEffect.IsTiltEnabled="True">

    <!--Description of how to animate to a specific page:-->
    <odc:PageTransitionService.PageTransitionGroup>
        <odc:PageAnimationGroup>
            <!--if there is no match with any other named page, this is used as default:-->
            <odc:TurnstileAnimation SwingMode="SwingOut" ItemDelay="0:0:0.04" />
            
            <!--named pages:-->
            <odc:FadeAnimation Page="/Pages/FadePage" />
            <odc:SwingAnimation Page="/Pages/SwingPage" SwingMode="SwingOut" />
            <odc:FluidAnimation Duration="0:0:0.20" Page="/Pages/FluidPage" ElementName="textItem" />
            <odc:SnapshotAnimation Page="/Pages/SlidePage" />
            <odc:SnapshotAnimation Page="/Pages/ZoomPage" />
            <odc:SnapshotAnimation Page="/Pages/ExplodePage" />
        </odc:PageAnimationGroup>
    </odc:PageTransitionService.PageTransitionGroup>


    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="ODYSSEY" Style="{StaticResource PhoneTextNormalStyle}" />
            <TextBlock x:Name="PageTitle" Text="Page Animations" Margin="9,-7,0,0"
                    Style="{StaticResource PhoneTextTitle1Style}" FontSize="56" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <odc:OdcListBox x:Name="listBox" ItemsSource="{Binding Items}" SelectionChanged="OnSelectionChanged">
                <odc:OdcListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Margin="0,0,0,17" Width="432">
                            <TextBlock x:Name="textItem" Text="{Binding Title}" TextWrapping="Wrap"
                                    Style="{StaticResource PhoneTextExtraLargeStyle}" />
                            <TextBlock Text="{Binding Description}" TextWrapping="Wrap" Margin="12,-6,12,0"
                                    Style="{StaticResource PhoneTextSubtleStyle}" />
                        </StackPanel>
                    </DataTemplate>
                </odc:OdcListBox.ItemTemplate>
            </odc:OdcListBox>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
